home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / extras / programm / gemfsc20 / gemfsc20.lzh / GEMFUNCS / OBJOXYWH.C < prev    next >
C/C++ Source or Header  |  1992-11-03  |  1KB  |  37 lines

  1. /**************************************************************************
  2.  * OBJOXYWH.C - Return GRECT data from object.
  3.  *************************************************************************/
  4.  
  5. #include "gemfintl.h"
  6.  
  7. /*-------------------------------------------------------------------------
  8.  * obj_xywh - Return object's GRECT, not adjusted to screen coordinates.
  9.  *-----------------------------------------------------------------------*/
  10.  
  11. void obj_xywh(ptree, object, prect)
  12.     register OBJECT  *ptree;
  13.     short               object;
  14.     register GRECT   *prect; /* really a pointer to a grect */
  15. {
  16.     ptree = &ptree[object];
  17.     prect->g_x = ptree->ob_x;
  18.     prect->g_y = ptree->ob_y;
  19.     prect->g_w = ptree->ob_width;
  20.     prect->g_h = ptree->ob_height;
  21. }
  22.  
  23. /*-------------------------------------------------------------------------
  24.  * obj_offxywh - Return object's GRECT, adjusted to screen coordinates.
  25.  *-----------------------------------------------------------------------*/
  26.  
  27. void obj_offxywh(ptree, object, prect)
  28.     register OBJECT  *ptree;
  29.     short               object;
  30.     register GRECT   *prect;
  31. {
  32.     obj_xywh(ptree, object, prect);
  33.     objc_offset(ptree, object, &prect->g_x, &prect->g_y);
  34. }
  35.  
  36.  
  37.